<template>
	<view class="u-p-20">
		<u-parse :html="content"></u-parse>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				content:'',
				title:''
			}
		},
		onLoad(o) {
			uni.setNavigationBarTitle({
				title:o.title
			})
			this.title=o.title
		},
		onShow() {
			if(this.title=='用户协议'){
				this.$api.user_agreement({}, res => {
					if (res.data.code == 1) {
						this.content=res.data.data
					}
				})
			}else if(this.title=='隐私政策'){
				this.$api.privacy_policy({}, res => {
					if (res.data.code == 1) {
						this.content=res.data.data
					}
				})
			}
		},
		onReady() {
			
		},
		methods: {
		}
	}
</script>

<style lang="scss">
	page {
		width: 100%;
		height: 100%;
	}
</style>
